//	水1	火2	木3	金4	土5
//var x = '11000';

var nowt = new Date().getHours();			//当前时次

function timeWx(){
	var wx = '';
	switch(nowt){
		case 23: 	wx = 1;break;
		case  0: 	wx = 1;break;
		case  1: 	wx = 5;break;
		case  2: 	wx = 5;break;
		case  3: 	wx = 3;break;
		case  4:	wx = 3;break;
		case  5: 	wx = 3;break;
		case  6:	wx = 3;break;
		case  7: 	wx = 5;break;
		case  8:	wx = 5;break;
		case  9: 	wx = 2;break;
		case 10:	wx = 2;break;
		case 11: 	wx = 2;break;
		case 12:	wx = 2;break;
		case 13: 	wx = 5;break;
		case 14:	wx = 5;break;
		case 15: 	wx = 4;break;
		case 16:	wx = 4;break;
		case 17: 	wx = 4;break;
		case 18:	wx = 4;break;
		case 19: 	wx = 5;break;
		case 20:	wx = 5;break;
		case 21: 	wx = 1;break;
		case 22:	wx = 1;break;
	}
	return wx;   //五行时间
}

module.exports = function(x){

	var count = x;
	if(typeof(x)=='string'){
		count = parseInt(x, 2).toString(10);	//0-31 （随机抛硬币，二进制转十进制）
	}
	var wxtime = timeWx();
	var o = 3.14159 * (count / wxtime) % 5 + 1;

	return o;
}
